:root {
  --primary: #4361ee;
  --primary-dark: #3a0ca3;
  --secondary: #f8f9ff;
  --accent: #4cc9f0;
  --light: #ffffff;
  --dark: #333333;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --border-radius: 12px;
  --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
  min-height: 100vh;
  padding: 20px;
  color: var(--dark);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: var(--light);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
}

header {
  background: linear-gradient(
    90deg,
    var(--primary) 0%,
    var(--primary-dark) 100%
  );
  color: var(--light);
  padding: 30px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

header::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

header::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -40px;
  width: 150px;
  height: 150px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 12px;
  font-weight: 700;
  position: relative;
  z-index: 2;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.app-container {
  display: flex;
  flex-direction: column;
  padding: 30px;
}

.upload-section {
  background: var(--secondary);
  border: 2px dashed var(--primary);
  border-radius: var(--border-radius);
  padding: 40px 20px;
  text-align: center;
  margin-bottom: 30px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.upload-section:hover {
  background: #edf2ff;
  transform: translateY(-3px);
  border-color: var(--primary-dark);
}

.upload-section.drag-over {
  background: #e0e7ff;
  border-color: var(--primary-dark);
}

.upload-icon {
  font-size: 60px;
  color: var(--primary);
  margin-bottom: 20px;
  transition: var(--transition);
}

.upload-text {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--primary-dark);
  font-weight: 500;
}

.upload-hint {
  color: var(--gray);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.btn {
  background: var(--primary);
  color: var(--light);
  border: none;
  padding: 14px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: var(--primary-dark);
  transition: var(--transition);
  z-index: -1;
}

.btn:hover::after {
  width: 100%;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4);
}

.btn:active {
  transform: translateY(0);
}

.btn.secondary {
  background: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
  box-shadow: none;
}

.btn.secondary:hover {
  background: #e9ecef;
  color: #212529;
}

.btn-lang {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-lang:hover {
  background: rgba(255, 255, 255, 0.2);
}

.btn-lang.active {
  background: var(--accent);
  color: var(--light);
  border-color: var(--accent);
}

.btn.select-all {
  background: #4cc9f0;
  padding: 10px 20px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
  align-items: center;
  background: var(--secondary);
  padding: 25px;
  border-radius: var(--border-radius);
}

.control-group {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 200px;
}

label {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary-dark);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="number"],
input[type="text"] {
  padding: 14px 15px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
  width: 100%;
}

input[type="number"]:focus,
input[type="text"]:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.preview-section {
  margin-bottom: 30px;
}

.section-title {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 15px;
}

.selection-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.preview-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.preview-item {
  background: var(--light);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  border: 1px solid var(--light-gray);
  position: relative;
}

.preview-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.preview-item.selected {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.3);
}

.preview-checkbox {
  position: absolute;
  top: 15px;
  left: 15px;
  width: 24px;
  height: 24px;
  z-index: 10;
  cursor: pointer;
  accent-color: var(--accent);
}

.preview-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.preview-info {
  padding: 15px;
  font-size: 0.9rem;
  color: #495057;
  background: #f8f9ff;
}

.preview-info div {
  margin-bottom: 5px;
}

.output-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 30px 0;
  border-top: 1px solid var(--light-gray);
  margin-top: 20px;
}

.action-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.export-btn {
  min-width: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

footer {
  text-align: center;
  padding: 25px 0;
  color: var(--gray);
  font-size: 0.9rem;
  border-top: 1px solid var(--light-gray);
  margin-top: 20px;
  background: #f8f9ff;
}

.step-indicator {
  display: flex;
  justify-content: center;
  margin-bottom: 40px;
  position: relative;
}

.step-indicator::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: #bdc5d4;
  z-index: 1;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 30px;
  position: relative;
  z-index: 2;
}

.step-number {
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: var(--light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-bottom: 10px;
  transition: var(--transition);
}

.step.active .step-number {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.step-text {
  font-size: 0.9rem;
  text-align: center;
  color: var(--primary-dark);
  font-weight: 500;
  background: var(--light);
  padding: 2px 8px;
  border-radius: 20px;
}

.selected-count {
  background: var(--accent);
  color: white;
  border-radius: 20px;
  padding: 5px 15px;
  font-weight: 600;
  font-size: 0.9rem;
}

.hidden {
  display: none;
}

.feature-highlight {
  background: linear-gradient(to right, #4cc9f0, #4361ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

@media (max-width: 900px) {
  .step-indicator::before {
    width: 70%;
  }

  .step {
    padding: 0 20px;
  }
}

@media (max-width: 768px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .step-indicator {
    flex-wrap: wrap;
    gap: 20px;
  }

  .step-indicator::before {
    display: none;
  }

  .step {
    width: 40%;
    margin-bottom: 20px;
  }

  .preview-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .export-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  header {
    padding: 20px 15px;
  }

  h1 {
    font-size: 1.8rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .app-container {
    padding: 20px;
  }

  .step {
    width: 100%;
  }

  .action-buttons {
    flex-direction: column;
    width: 100%;
  }
}
